{% extends 'tend/account/common/base.html' %}
{% import "tend/macros/_patination.html" as page_macros %}
{% block css %}
{{super()}}
<link href="{{ url_for('main.static', filename='css/account.css')}}" rel="stylesheet">
<style>
    .list-group-item {
        background-color: inherit;
    }
</style>
{% endblock %}
{% block contents %}

<div class="container">
    <div class="row justify-content-md-center mt-2">
        <div class="col mb-1">
            <a href="{{url_for('.auth_cards_add')}}" class="btn btn-success ">购买卡密</a>
        </div>
        <table class="table table-bordered">
            <thead>
                <tr>
                    <th scope="col">卡密</th>
                    <th scope="col">描述</th>
                    <th scope="col">限制绑定</th>
                    <th scope="col">已绑</th>
                    <!-- <th scope="col">创建时间</th> -->
                    <th scope="col">到期时间</th>
                    <th scope="col">设备列表</td>
                </tr>
            </thead>
            <tbody>
                {% for d in pagelist.items %}
                <tr>
                    <th scope="row">{{d.card_no}}</th>
                    <td>{{d.mold}}</td>
                    <td>{{d.limit_count}}</td>
                    <td>{{d.bind_count}}</td>
                    <!-- <td>{{d.ctime}}</td> -->
                    <td>{{d.deadline}}</td>
                    <td><a href="{{url_for('.bindlist', card_no=d.card_no)}}">查看</a></td>
                </tr>
                {% endfor %}
            </tbody>
        </table>
        {{ page_macros.pagination_widget(pagelist, '.auth_cards') }}
    </div>


</div>
{% endblock %}
{% block js %}
{{ super() }}
{% endblock %}